package 拷贝目录.Test01;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Copy {
    File file;
    String target;

    public Copy(File file, String target) {
        this.file = file;
        this.target = target;
    }

    public Copy() {
    }

    public void copy(){
        File[] files = file.listFiles();
        int i = files.length-1;
        File[] files1 = find(i,files);
        for (File file : files1){
            System.out.println(file.getAbsolutePath());
        }
    }
    public File[] find(int i,File[] files){
        i = i-1;
        if (i >= 1){
            File[] files1 = find(i,files);
            int i2 = files1.length-1;
            i2 = i2-1;
            if (i2 >= 1){
                File[] files2 = find(i2,files1);
            }
        }
        File[] files1 = files[i].listFiles();
/*
        int i2 = files1.length-1;

        i2 = i2-1;
        if (i2 >= 1){
            find(i2,files1);
        }
*/
        return files1;
    }
}
